package com.zhan.rkforum.dao;

import com.zhan.rkforum.bean.LoginTicket;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 登录票映射器
 *
 * @author mrwu-
 * @date 2021/06/23
 */
@Mapper
@Repository
public interface LoginTicketMapper {
    /**
     * 插入登陆凭证
     *
     * @param loginTicket 凭证
     */
    void insertLoginTicket(LoginTicket loginTicket);

    /**
     * 更新状态
     *
     * @param ticket 凭证
     * @param i      状态码
     */
    void updateStatus(@Param("ticket") String ticket, @Param("status") int i);

    /**
     * 查询登陆凭证
     *
     * @param ticket 登录凭证
     * @return {@link LoginTicket}
     */
    LoginTicket selectLoginTicket(@Param("ticket") String ticket);
}
